package com.imooc.common.controller.select;

import cn.hutool.core.thread.ThreadUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

/**
 * Created by deng_wb on 2020/8/11
 */
public class TaskZHF implements Callable<SelectResponse> {
    /**
     * Computes a result, or throws an exception if unable to do so.
     *
     * @return computed result
     * @throws Exception if unable to compute a result
     */
    @Override
    public SelectResponse call() throws Exception {
        ThreadUtil.sleep(1, TimeUnit.SECONDS);

        SelectResponse selectResponse = new SelectResponse();

        packageData(selectResponse);

        return selectResponse;
    }

    private void packageData(SelectResponse selectResponse) {
        selectResponse.setSuccesscode("T");
        selectResponse.setSupplierId("ZHF000001");

        SelectResponse.Contact contact = new SelectResponse.Contact();
        contact.setCaptcha("111111");
        contact.setCardNo("1");
        contact.setCardType("1");
        contact.setEncMobileNo("13141463141");
        contact.setMobileStatus("successed");
        contact.setPassengerName("邓武博");
        contact.setPassengerType("1");
        contact.setStatus("111111");

        selectResponse.setData(Arrays.asList(contact));


    }
}
